import { FC } from "react";

type titlePropType = {
  content?: String;
  level?: Number;
  isCenter?: Boolean;
};

const TitleComponent: FC<titlePropType> = ({
  content = "请输入标题",
  level = 1,
}) => {
  return (
    <div>
      {level === 1 ? (
        <h1>{content}</h1>
      ) : level === 2 ? (
        <h2>{content}</h2>
      ) : level === 3 ? (
        <h3>{content}</h3>
      ) : level === 4 ? (
        <h4>{content}</h4>
      ) : level === 5 ? (
        <h5>{content}</h5>
      ) : (
        <h6>{content}</h6>
      )}
    </div>
  );
};

export default TitleComponent;
